import java.util.Arrays;

/**
 * @Author 12629
 * @Description：
 */
public class Test2 {

    public static int add(int a,int b) {
        return a + b;
    }

    public static double add(double a,double b) {
        return a + b;
    }

    public static double add(double a,double b,int c) {
        return a + b + c;
    }

    public static double add(int c,double a,double b) {
        return  a + b + c;
    }
    // 求3个整数的最大值   求 2个整数的最大值   构成重载
    public static int max(int a,int b) {
        return a >b ? a : b;
    }

    public static int max(int a,int b,int c) {
        int tmp = max(a,b);
        return max(tmp,c);
    }

    public static void print(int a,int b) {
        System.out.println(a+" " + b);
    }

    public static void print(int a,int b,int c) {
        System.out.println(a+" " + b +" " + c);
    }
    //打印一组 都是整型的数据
    //可变参数编程
    public static void print(int... k) {
        for (int i = 0; i < k.length; i++) {
            System.out.print(k[i]+" ");
        }
        System.out.println();
    }

    public static void main(String[] args) {
        print(1,2);
        print(1,2,3);
        print(1,2,3,4);
        print(1,2,3,4,5,6,7,8,9,10);

        int[] array = {1,2,3,4,5,6,7,8,9,0};
        print(array);

    }

    public static void main1(String[] args) {
        int a = 1;
        //int a = 10;
        int b = 2;
        System.out.println(add(a, b));

        double d1 = 12.4;
        double d2 = 34.5;
        System.out.println(add(d1, d2));


    }
}
